﻿CREATE TABLE [dbo].[ClinRecipeOrderItem]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY,
	[ClinRecipeOrderId] INT NOT NULL,
	[CardNo] NVARCHAR(50) NULL, 
	[RecipeId]  NVARCHAR(50) NULL,
	[FlowNo]  NVARCHAR(50) NULL,
	[PatName]  NVARCHAR(50) NULL,
	[CureDate]  NVARCHAR(50) NULL,
	[DeptHisCode]  NVARCHAR(50) NULL,
	[DeptName]  NVARCHAR(50) NULL,
	[DocHisCode]  NVARCHAR(50) NULL,
	[DocName]  NVARCHAR(50) NULL,
	[PayType]  NVARCHAR(50) NULL,
	[RecipeType]  NVARCHAR(50) NULL,
	[TotalAmt]  NVARCHAR(50) NULL,
	[SelfAmt] NVARCHAR(50) NULL,
	[SbPayAmt] NVARCHAR(50) NULL,
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'ClinRecipeOrder.Id',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'ClinRecipeOrderId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'诊疗卡号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'CardNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'处方标识',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'RecipeId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'病人每次就诊的ID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'FlowNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'病人名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'PatName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'就诊时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'CureDate'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'科室代码',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'DeptHisCode'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'科室',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'DeptName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生代码',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'DocHisCode'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'DocName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'费用类别:自费/顺德医保/...',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'PayType'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'处方类型',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'RecipeType'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'总金额',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'TotalAmt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'自费金额',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'SelfAmt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'社保报销金额',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ClinRecipeOrderItem',
    @level2type = N'COLUMN',
    @level2name = N'SbPayAmt'